<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Packaging and distribution</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="internals2.pdo.testing.html">Testing</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="internals2.pdo.pdo-dbh-t.html">pdo_dbh_t definition</a></div>
 <div class="up"><a href="internals2.pdo.html">PDO 驱动</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="internals2.pdo.packaging" class="sect1">
 <h2 class="title">Packaging and distribution</h2>
 <div class="sect2" id="internals2.pdo.packaging.creating">
  <h3 class="title">Creating a package</h3>
  <p class="para">
   PDO drivers are released via PECL; all the usual rules for PECL extensions
   apply.  Packaging is accomplished by creating a valid
   <var class="filename">package.xml</var> file and then running:
  </p>

  <div class="example-contents screen">
<div class="cdata"><pre>
$ pecl package
</pre></div>
  </div>

  <p class="para">
   This will create a tarball named <var class="filename">PDO_SKEL-X.Y.Z.tgz</var>.
  </p>

  <p class="para">
   Before releasing the package, you should test that it builds correctly; if
   you&#039;ve made a mistake in your <var class="filename">config.m4</var> or
   <var class="filename">package.xml</var> files, the package may not function
   correctly.  You can test the build, without installing anything, using the
   following invocation:
  </p>

  <div class="example-contents screen">
<div class="cdata"><pre>
$ pecl build package.xml
</pre></div>
  </div>
  <p class="para">
   Once this is proven to work, you can test installation:
  </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
$ pecl package
$ sudo pecl install PDO_SKEL-X.Y.X.tgz
</pre></div>
  </div>

  <p class="para">
   Full details about <var class="filename">package.xml</var> can be found in the PEAR
   Programmer&#039;s documentation (<a href="http://pear.php.net/manual/" class="link external">&raquo;&nbsp;http://pear.php.net/manual/</a>).
  </p>
 </div>

 <div class="sect2" id="internals2.pdo.packaging.creating.releasing">
  <h3 class="title">Releasing the package</h3>
  <p class="para">
   A PDO driver is released via the PHP Extension Community Library (PECL).
   Information about PECL can be found at <a href="http://pecl.php.net/" class="link external">&raquo;&nbsp;http://pecl.php.net/</a>.
  </p>
 </div>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="internals2.pdo.testing.html">Testing</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="internals2.pdo.pdo-dbh-t.html">pdo_dbh_t definition</a></div>
 <div class="up"><a href="internals2.pdo.html">PDO 驱动</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
